﻿<phone:PhoneApplicationPage 
    x:Class="Roller.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="800" 
    d:DataContext="{d:DesignData SampleData/MainViewModelSampleData.xaml}"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait"  Orientation="Portrait"
    shell:SystemTray.IsVisible="False">
 
 <!--LayoutRoot is the root grid where all page content is placed-->
 <Grid x:Name="LayoutRoot" Background="Transparent">
  
  <!--Panorama control-->
  <controls:Panorama Title="Roll 'em">
   <controls:Panorama.Background>
    <ImageBrush ImageSource="PanoramaBackground.png"/>
   </controls:Panorama.Background>
   <!--Panorama item one-->
   <controls:PanoramaItem Header="rolling">
    <Grid>
     <Grid.RowDefinitions>
      <RowDefinition Height="430" />
      <RowDefinition Height="auto" />
     </Grid.RowDefinitions>
     <!-- rolling space -->
     <Canvas Grid.Row="0" x:Name="RollingCanvas">
     </Canvas>
     <!--<ItemsControl Grid.Row="0" ItemsSource="{Binding Dice}">
      <ItemsControl.ItemsPanel>
       <ItemsPanelTemplate>
       </ItemsPanelTemplate>
      </ItemsControl.ItemsPanel>
      <ItemsControl.ItemTemplate>
       <DataTemplate>
        <Grid Width="80" Height="80" Background="White" Margin="2">
         <Grid.RowDefinitions>
          <RowDefinition Height="Auto" />
          <RowDefinition Height="*" />
         </Grid.RowDefinitions>
         <StackPanel Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="Right">
          <TextBlock FontSize="12" Text="D" Foreground="Black" />
          <TextBlock FontSize="12" Text="{Binding MaximumValue}" Foreground="Black" Padding="0,0,10,0" />
         </StackPanel>
         <TextBlock FontSize="32" Text="{Binding LastRoll}" Grid.Row="1" Foreground="Black" Width="80" TextAlignment="Center" FontWeight="Bold"  />
        </Grid>
       </DataTemplate>
      </ItemsControl.ItemTemplate>
     </ItemsControl>-->
     <StackPanel Grid.Row="1" Orientation="Horizontal">
      <TextBlock x:Name="AccelerometerReading" FontSize="14" />
      <Button Click="RollDice">
       <TextBlock Text="Woo" />
      </Button>
     </StackPanel>
    </Grid>
   </controls:PanoramaItem>

   <!--Panorama item two-->
   <!--Use 'Orientation="Horizontal"' to enable a panel that lays out horizontally-->
   <controls:PanoramaItem Header="dice bag">
    <!--Double line list with image placeholder and text wrapping-->
    <ListBox Margin="0,0,-12,0">
     <ScrollViewer VerticalScrollBarVisibility="Visible">
      <StackPanel Grid.Row="2" Orientation="Vertical" HorizontalAlignment="Stretch">
      <Button Width="80" Height="80" Content="4" Click="ButtonClick" Tag="4" />
      <Button Width="80" Height="80" Content="6" Click="ButtonClick" Tag="6" />
      <Button Width="80" Height="80" Content="8" Click="ButtonClick" Tag="8" />
      <Button Width="80" Height="80" Content="10" Click="ButtonClick" Tag="10" />
      <Button Width="80" Height="80" Content="12" Click="ButtonClick" Tag="12" />
      <Button Width="80" Height="80" Content="50" Click="ButtonClick" Tag="50" />
      <Button Width="80" Height="80" Content="100" Click="ButtonClick" Tag="100" />
      </StackPanel>
     </ScrollViewer>
    </ListBox>
   </controls:PanoramaItem>
  </controls:Panorama>
 </Grid>

 <!--Panorama-based applications should not show an ApplicationBar-->

</phone:PhoneApplicationPage>